import { request } from "/src/api/service";
class IResponse<T> {}

export const GetList = (): Promise<IResponse<any>> => {
  return request({
    url: "http://localhost:8000/community/actives/",
    method: "get",
    headers: {
    }
  });
};

export function DelObj(id) {
  return request({
    url: "http://localhost:8000/community/actives/" + id,
    method: "delete"
  });
}

export function AddObj(obj) {
  return request({
    url: "http://localhost:8000/community/actives/",
    method: "post",
    data: obj
  });
}

export function UpdateObj(obj) {
  return request({
    url: "http://localhost:8000/community/actives/"+obj.id+"/",
    method: "put",
    data: obj
  });
}
/*

export function AddObj(obj) {
  return request({
    url: apiPrefix + "/add",
    method: "post",
    data: obj
  });
}

export function UpdateObj(obj) {
  return request({
    url: apiPrefix + "/update",
    method: "post",
    data: obj
  });
}

export function DelObj(id) {
  return request({
    url: apiPrefix + "/delete",
    method: "post",
    params: { id }
  });
}

export function GetObj(id) {
  return request({
    url: apiPrefix + "/get",
    method: "get",
    params: { id }
  });
}
*/
